package com.waitingresult.thread.callable;

import java.util.concurrent.FutureTask;

/**
 * All right reserved,Designed By WangShuai
 *
 * @author : WangShuai
 * @version : V1.0
 * @ClassName : CallableDemo
 * @Description :
 * @date : 2022/9/18 19:26
 */
public class CallableDemo<T extends Object > {
    public static void main(String[] args) throws Exception{
        M m = new M();
        FutureTask<M> task = new FutureTask<M>(m);
        Thread thread = new Thread(task);
        thread.start();
        M m1 = task.get();
        System.err.println(m);
        System.err.println(m1);
    }
}
